﻿using Romantics.Domain.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Romantics.Domain
{
    public interface IDomainRepository
    {
        int Total<U>() where U:Entity;

        int Add<U>(U entity) where U:Entity;
        void Edit<U>(U entity) where U : Entity;
        void Delete<U>(int id) where U : Entity;

        #region Country

        IList<Country> Countries(int pageNo, int pageSize, string sortColumn, bool sortByAscending);

        #endregion

        Category Category(string url);
        Category Category(int id);
        IList<Category> Categories();

        #region Region

        Region Region(string url);
        Region Region(int id);
        IList<Region> Regions(int pageNo, int pageSize, string sortColumn, bool sortByAscending, string name = null, string country = null);

        #endregion

        IList<int> Years();

        IList<Hike> PlannedHikes(int pageNo, int pageSize, Category category = null, Region region = null);
        int TotalPlannedHikes(Category category = null, Region region = null);

        IList<Hike> PreviousHikes(int pageNo, int pageSize, int? year, Category category = null, Region region = null);
        int TotalPreviousHikes(int? year, Category category = null, Region region = null);
        Hike Hike(int id);

        IList<Hike> Hikes(int pageNo, int pageSize, string sortColumn, bool sortByAscending, string name = null, string category = null, string region = null);

        IList<PhotoAlbumSummary> PhotoAlbumSummary(int pageNo, int pageSize, string sortColumn, bool sortByAscending, string name = null, string hike = null);
        IList<PhotoAlbum> PhotoAlbums(int pageNo, int pageSize, int? year, Category category = null, Region region = null);
        int TotalPhotoAlbums(int? year, Category category = null, Region region = null);
        PhotoAlbum PhotoAlbum(int id);
        int PhotoAlbumItemsCount(int id);

        PhotoAlbumItem PhotoAlbumItem(int id);

        Report Report(int id);
        IList<Report> Reports(int pageNo, int pageSize, string sortColumn, bool sortByAscending, string name = null, string hike = null);

        Options Options();
        IList<Options> OptionList();
    }
}
